#ifndef __NAMESTORAGE__

#define __NAMESTORAGE__

#include<string>
#include<vector>
#include<set>

class NameStorage {
		
	std::vector<std::string> storage;
	
	public:
		
	NameStorage();
	NameStorage(NameStorage const &);
	~NameStorage();
	
	std::string const & operator[](int) const;
	std::string & operator[](int);
	
	int findName(std::string const &) const;
	unsigned addName(std::string const &);
	unsigned addOrRename(std::string const &);

	unsigned resolveConflict(std::set<unsigned> const &, std::string const &);
	
};

#endif
